<template>
    <div>
        <h1>{{ title }}</h1>
        <child @getMessage="showMsg"></child>
    </div>
</template>

<script>
  import Child from './Child.vue'

  export default {
    name: 'Test',
    components: {Child},
    data () {
      return {
        title: ''
      }
    },
    methods: {
      showMsg(title) {
        this.title = title;
      }
    }

  }
</script>

<style scoped>

</style>
